﻿<Window x:Class="DBLoader.GenomeChooser"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		Title="Choose genomes for BLAST"
		Height="300"
		Width="400">


	<Window.Resources>
		<DataTemplate x:Key="listBoxTemplate">
			<StackPanel Orientation="Horizontal">
				<TextBlock Text="{Binding AccessionVersion}"
						   Width="80" />
				<TextBlock Text="{Binding Definition}"
						   Margin="3 0 0 0" />
				<TextBlock Text="("
						   Margin="3 0 0 0" />
				<TextBlock Text="{Binding GeneCount}" />
				<TextBlock Text=" genes)" />
			</StackPanel>
		</DataTemplate>

		<Style x:Key="LabelBase"
			   TargetType="TextBlock">
			<Setter Property="VerticalAlignment"
					Value="Center" />
		</Style>

		<Style x:Key="LabelStyle"
			   BasedOn="{StaticResource LabelBase}"
			   TargetType="TextBlock">
			<Setter Property="Width"
					Value="100" />
			<Setter Property="Margin"
					Value="15 0 0 0" />
		</Style>

		<Style x:Key="LabelStyle2"
			   BasedOn="{StaticResource LabelBase}"
			   TargetType="TextBlock">
			<Setter Property="Width"
					Value="15" />
		</Style>

		<Style x:Key="TextBoxStyle"
			   TargetType="TextBox">
			<Setter Property="Width"
					Value="100" />
		</Style>
	</Window.Resources>

	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="*" />
			<RowDefinition Height="3" />
			<RowDefinition Height="auto" />
			<RowDefinition Height="3" />
			<RowDefinition Height="auto" />
			<RowDefinition Height="3" />
			<RowDefinition Height="auto" />
			<RowDefinition Height="3" />
			<RowDefinition Height="auto" />
			<RowDefinition Height="3" />
			<RowDefinition Height="auto" />
		</Grid.RowDefinitions>

		<ListBox Grid.Row="0"
				 Name="genomeList"
				 ItemTemplate="{StaticResource listBoxTemplate}"
				 SelectionMode="Extended" />

		<StackPanel Orientation="Horizontal"
					Grid.Row="4">
			<TextBlock Style="{StaticResource LabelStyle}"
					   Text="Threshold e-value" />

			<TextBlock Style="{StaticResource LabelStyle2}" Text="-e " />

			<TextBox Name="eValueField"
					 Style="{StaticResource TextBoxStyle}"
					 Text="1.0e-10" />
		</StackPanel>

		<TextBlock Grid.Row="2"
				   Text="Blast settings:" />

		<StackPanel Orientation="Horizontal"
					Grid.Row="6">
			<TextBlock Style="{StaticResource LabelStyle}"
					   Text="Gap open cost" />

			<TextBlock Style="{StaticResource LabelStyle2}" Text="-G " />

			<TextBox Name="gapOpenField"
					 Style="{StaticResource TextBoxStyle}"
					 Text="11" />
		</StackPanel>

		<StackPanel Orientation="Horizontal"
					Grid.Row="8">
			<TextBlock Style="{StaticResource LabelStyle}"
					   Text="Gap ext cost" />

			<TextBlock Style="{StaticResource LabelStyle2}" Text="-E " />

			<TextBox Name="gapExtendField"
					 Style="{StaticResource TextBoxStyle}"
					 Text="1" />

		</StackPanel>
		<Grid Grid.Row="10">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="10" />
				<ColumnDefinition Width="*" />
			</Grid.ColumnDefinitions>

			<Button Width="50"
					Content="Ok"
					HorizontalAlignment="Right"
					Click="Ok" />

			<Button Width="50"
					Content="Cancel"
					HorizontalAlignment="Left"
					Click="Cancel"
					Grid.Column="3" />
		</Grid>
	</Grid>
</Window>
